home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
lang
/
amigatalk.lha
/
intuition
/
BoopsiFuelGaugeTags.st
< prev
next >
Wrap
Text File
|
2002-05-05
|
3KB
|
77 lines
" --------------------------------------------------------------------- "
" BoopsiFuelGaugeTags Class is a Singleton class that allows the user "
" to reference BOOPSI FuelGauge class tags' hexadecimal values. "
""
" EXAMPLE: 'myTag <- fuelGaugeTags getTag: #FUELGAUGE_Level' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" --------------------------------------------------------------------- "
Class BoopsiFuelGaugeTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
getTag: tagKey
^ self at: tagKey
|
privateInitializeDictionary
self at: #FUELGAUGE_Min put: 16r85012001. " fuelgauge minimum value. "
self at: #FUELGAUGE_Max put: 16r85012002. " fuelgauge maximum value. "
self at: #FUELGAUGE_Level put: 16r85012003. " fuelgauge level (value between min and max). "
self at: #FUELGAUGE_Orientation put: 16r85012004. " orientation mode. "
self at: #FUELGAUGE_Percent put: 16r85012005. " (BOOL) render numeric percentage display. "
self at: #FUELGAUGE_Ticks put: 16r85012006. " enable tick marks if # of ticks set is not 0. "
self at: #FUELGAUGE_ShortTicks put: 16r85012007. " enable small intermediate tick marks. "
self at: #FUELGAUGE_TickSize put: 16r85012008. " height of large tick marks. "
self at: #FUELGAUGE_TickPen put: 16r85012009. " tickmark pen. "
self at: #FUELGAUGE_PercentPen put: 16r8501200A. " pen # to use for inner rendering. "
self at: #FUELGAUGE_FillPen put: 16r8501200B. " pen # to use for the fuelbar. "
self at: #FUELGAUGE_EmptyPen put: 16r8501200C. " fuelgauge background/empty pen number. "
self at: #FUELGAUGE_VarArgs put: 16r8501200D. " argument array for GA_Text varargs string "
self at: #FUELGAUGE_Justification put: 16r8501200E. " GA_Text justification mode "
" FUELGAUGE_Orientation modes: "
self at: #FGORIENT_HORIZ put: 0.
self at: #FGORIENT_VERT put: 1.
" FUELGAUGE_Justification modes: "
self at: #FGJ_LEFT put: 0. " default "
self at: #FGJ_CENTER put: 1.
self at: #FGJ_CENTRE put: 1. " english/canadian spellings "
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self privateInitializeDictionary.
].
^ self "or ^ uniqueInstance??"
]